<template>
</template>

<script>
    export default {
        name: 'DocumentTitle',
        props: {
            title: {type: String, required: true}
        },
        watch: {
            title (newVal) {
                this.setTitle(newVal);
            }
        },
        methods: {
            setTitle (title) {
                document.title = title;
            }
        },
        mounted () {
            this.setTitle(this.title);
        }
    };
</script>
